/*
 * @Description: 用户服务
 * @Author: seadon
 * @LastEditors: seadon
 * @Date: 2021-07-21 20:55:33
 * @LastEditTime: 2021-07-21 21:37:03
 */
import { ref, Ref } from 'vue'
import { apiInit } from '@/services'

export default function useModel() {
	const api = apiInit()
	const countData: Ref<typing.TaskCountBo> = ref({})

	const fetchTaskCount = async () => {
		const { code, data } = await api.default.CountTaskPrivateV2POST({})
		if (code === '000000' && data) {
			countData.value = data
		}
	}

	return {
		countData,
		fetchTaskCount,
	}
}
